package com.zt.questionnaire.model.excel.questionnaire;//package com.zt.questionnaire.model.excel.questionnaire;
//
//import com.llps.ms.service.excel.HExcelIllnessNewService;
//import com.llps.ms.service.excel.HExcelService;
//import com.yunmaster.core.service.HReadExcelFather;
//import com.yunmaster.core.utils.NumberUtils;
//import lombok.Data;
//
//import java.util.ArrayList;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
///**
// * 问题表
// * @author sy
// *
// */
//@Data
//public class IllnessIllnessQuestionExcel implements Cloneable{
//
//	/**疾病id**/
//	private int illness_id;
//
//	/**性别0=男1=女**/
//	private Integer sex;
//
//	/**年龄段
//	 * 	1=[1-13]
//		2=[14-17]
//		3=[18-39]
//		4=[40-64]
//		5=[65-200]**/
//	private int age;
//
//	/**问题id**/
//	private String questions;
//
//	/**问题id列表**/
//	private List<Integer> quesIdList = new ArrayList<>();
//
//
//
//	public static Map<String, IllnessIllnessQuestionExcel> load(String[] titleNames,String[][] values) throws Exception{
////		boolean is = true;
//		Map<String, IllnessIllnessQuestionExcel> map = new HashMap<>();
//		List<IllnessIllnessQuestionExcel> list = HReadExcelFather.load(IllnessIllnessQuestionExcel.class, titleNames, values);
//		for (IllnessIllnessQuestionExcel base : list) {
//			int illness_id2 = base.illness_id;
//			Integer sex2 = base.sex;
//			int age2 = base.age;
//			if(illness_id2 == 0){
//				continue;
//			}
//
//			List<Integer> list2 = NumberUtils.splitIntList(base.getQuestions(), ",");
//			base.setQuesIdList(list2);
//
//			String key = null;
//			if(age2 == HExcelService.age_all){
//				//不区分年龄段，程序自己拆分
//				int[] ages = HExcelService.ages;
//				for (int age3 : ages) {
//					key = HExcelIllnessNewService.getQuestionKey(illness_id2, sex2, age3);
//					IllnessIllnessQuestionExcel clone = (IllnessIllnessQuestionExcel) base.clone();
//					clone.quesIdList = new ArrayList<>();
//					clone.quesIdList.addAll(base.getQuesIdList());
//					clone.setAge(age3);
//					map.put(key, clone);
//				}
//			}else{
//				key = HExcelService.getQuestionKey(illness_id2, sex2, age2);
//				map.put(key, base);
//			}
//
//		}
////		if(!is){
////			throw new Exception("excel表格读取错误");
////		}
//		return map;
//	}
//}
